<?php
$title = 'Login';
$this->headTitle($title);
$form = $this->form;
$form->setAttribute('action', $this->url(
                'login/process', array('action' => 'authenticate',)));
$form->prepare();
?>
<div class="content">
    <h1><?php echo $this->escapeHtml($title); ?></h1>
    <?php
    echo $this->form()->openTag($form);
    ?>
    <table>	
        <tr>
            <td valign="mid"><label for="email">Email</label></td>
            <td><?php echo $this->formEmail($form->get('email')); ?></td>
            <td><?php echo $this->formElementErrors($form->get('email')); ?></td>
        </tr>
        <tr>
            <td valign="mid"><label for="password">Password</label></td>
            <td><?php echo $this->formPassword($form->get('password')); ?></td>
            <td><?php echo $this->formElementErrors($form->get('password')); ?></td>
        </tr>
        <tr>
            <td valign="mid"><label for="rememberMe">Remember Me?</label></td>
            <td><?php echo $this->formCheckbox($form->get('rememberMe')); ?></td>
            <td><?php echo $this->formElementErrors($form->get('rememberMe')); ?></td>
        </tr>
        <tr>
            <td></td>
            <td><?php echo $this->formSubmit($form->get('submit')); ?>
                <a href="<?php echo $this->url('application', array('action' => 'index',)); ?>" 
                   class="button">Cancelar</a></td>
        </tr>
    </table>  
    <?php
    echo $this->form()->closeTag();

    if ($this->messages) {
        echo '<ul>';
        foreach ($this->messages as $message) {
            echo '<li>' . $message . '</li>';
        }
        echo '</ul>';
    }
    ?>
</div>